import { ref } from 'vue'

export function useState<T>(initValue: T) {
	const state = ref(initValue)
	
	function set(value: T) {
		state.value = value as any
	}
	
	return [state, set]
}